﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Wizard.MsSql
{
    public partial class SourceFile : Wizard.Source.ISourceFile
    {
        #region ISourceFile Members

        string Wizard.Source.ISourceFile.FileName
        {
            get
            {
                return this._FileName;
            }
        }

        int Wizard.Source.ISourceFile.SourceFileId
        {
            get
            {
                return SourceFileId;
            }
        }

        string Wizard.Source.ISourceFile.SourceText
        {
            get
            {
                return _SourceText;
            }
        }

        bool Wizard.Source.ISourceFile.Compiled
        {
            get
            {
                return this._Compiled;
            }
        }

        Wizard.Source.IWizardApplication Wizard.Source.ISourceFile.Application
        {
            get { return this.Application; }
        }

        void Wizard.Source.ISourceFile.Update(Wizard.IDataStoreContext dataStore, string newFilename, string newSourceText, bool compiled)
        {
            this.FileName = newFilename;
            this.SourceText = newSourceText;
            this.Compiled = compiled;
            dataStore.SaveAllChanges();
        }

        #endregion
    }
}
